home *** CD-ROM | disk | FTP | other *** search
- 10 rem*****************************
- 20 rem* *
- 30 rem* windows demonstration *
- 40 rem* *
- 50 rem* eric randall 1988 *
- 60 rem* *
- 70 rem*****************************
- 80 rem
- 90 rem initialisation
- 100 rem
- 105 poke53280,14:poke646,14:poke53281,6:print"[147] loading: machine code[154]"
- 110 ifpeek(49152)<>72thenload"windows mc",8,1
- 120 poke52,100:poke56,100
- 130 init=50176:set=50179:pull=50182:back=50185:down=50188:up=50191:left=50194
- 140 right=50197
- 150 poke53265,peek(53265)and239
- 160 sysinit:sysset,1,3,5,19,30:sysset,2,2,2,14,30:sysset,4,5,8,8,23
- 170 syspull,1
- 180 print"[147] instructions[146]":print"initialise system - sys50176
- 190 [153]"define window - sys50179,a,b,c,d,e where:":[153]" a=window number (1 to 4)
- 200 print" b=start line c=start row":print" d=number of lines
- 210 [153]" e=number of rows":[153]"pull down window - sys50182,a where a=window number
- 220 print"push back current window - sys50185"
- 230 print"press a key":sysback
- 240 syspull,4:print"[147]to drag windows :-
- 250 [153]" down - sys50188 f3wait":[153]" up - sys50191 f4wait"
- 260 [153]" left - sys50194 f6wait":[153]" right - sys50197 f5wait"
- 270 [158]back:[151]53265,[194](53265)[170]16
- 280 [143]
- 290 [143] main menu
- 300 [143]
- 310 [153]"load windows demonstration wait"
- 320 [153]" 1wait - instructions
- 330 print" 2[146] - disk directory listing
- 340 [153]" 3wait - define your own window
- 350 print" 4[146] - pull down a window
- 360 [153]" 5wait - exit
- 370 print"after each exercise, press f1 to exit from a window
- 380 [153]" select optionwait
- 390 geta$:ifa$<"1"ora$>"5"then390
- 400 onval(a$)goto410,490,560,660,480
- 410 rem
- 420 rem pull instruction window
- 430 rem
- 440 syspull,1:gosub740
- 450 syspull,4:gosub740
- 460 sysback:sysback
- 470 goto390
- 480 end
- 490 rem
- 500 rem display directory
- 510 rem
- 520 syspull,2
- 530 print"[147] disk listing[146]":print"insert disk and press a key"
- 540 geta$:ifa$=""then540
- 550 gosub850:gosub740:sysback:goto390
- 560 rem
- 570 rem define a window
- 580 rem
- 590 syspull,1:print"[147] define window[146]":print"your window will be number 3
- 600 a[178]3:[153]" start line";:[133]b:[153]"start row";:[133]c
- 610 [153]"number of lines";:[133]d:[153]"number of rows";:[133]e
- 620 [158]set,a,b,c,d,e:[158]pull,a
- 630 [153]"loadthis is your window. use the curser and home controls to set up";
- 640 [153]"the display in this window then press return
- 650 inputa$:sysback:sysback:goto390
- 660 rem
- 670 rem pull down a window
- 680 rem
- 690 syspull,2:print"[147] pull down a window[146]
- 700 [153]"which window (1, 3 or 4)":[133]a
- 705 [139]a[179]1[176]a[177]4[176]a[178]2[167]700
- 710 [158]pull,a
- 720 [141]740
- 730 [158]back:[158]back:[137]390
- 740 [143]
- 750 [143] check which key pressed
- 760 [143] and move window
- 770 [143]
- 780 [161]a$:[139]a$[178]""[167]780
- 790 a[178][198](a$)
- 800 [139]a[178]138[167][158]up:[137]740
- 810 [139]a[178]134[167][158]down:[137]740
- 820 [139]a[178]139[167][158]left:[137]740
- 830 [139]a[178]135[167][158]right:[137]740
- 840 [142]
- 850 [143]
- 860 [143] print disk directory
- 870 [143]
- 880 [159]2,8,15:z[178]0:p[178]1:[152]2,"i
- 890 open1,8,0,"$0"
- 900 get#1,a$,b$
- 910 get#1,a$,b$
- 920 get#1,a$,b$
- 930 c=0
- 940 if a$<>"" then c=asc(a$)
- 950 if b$<>"" then c=c+asc(b$)*256
- 960 d=3-len(str$(c)):d=e
- 970 print""mid$(str$(c),2);tab(3+e);"[146]";
- 980 forj=0tod:print" ";:next
- 990 get#1,b$:if st<>0 then 1090
- 1000 if b$<>chr$(34) then 990
- 1010 get#1,b$:if b$<>chr$(34)then printb$;:goto1010
- 1020 get#1,b$:if b$=chr$(32) then 1020
- 1030 print tab(21+e);:c$=""
- 1040 c$=c$+b$:get#1,b$:if b$<>"" then 1040
- 1050 print""left$(c$,3)
- 1060 ifz=0thenprint:z=z+1
- 1070 p=p+1:ifp=10then1110
- 1080 if st=0 then 910
- 1090 print" blocks free"
- 1100 close1:close2:return
- 1110 print"press a key[146]"
- 1120 geta$:ifa$=""then1120
- 1130 p=0:goto1080
-